We compute the free energy of helium-4 near the lambda transition based on an exact renormalization-group equation. An approximate solution permits the determination of universal and nonuniversal thermodynamic properties starting from the microphysics of the two-particle interactions. The method does not suffer from infrared divergences. The critical chemical potential agrees with experiment. This supports a specific formulation of the functional integral that we have proposed recently. Our results for the equation of state reproduce the observed qualitative behavior. Despite certain quantitative shortcomings of our approximation, this demonstrates that ab initio calculations for collective phenomena become possible by modern renormalization-group methods.